package com.mdd.common.enums;

import com.google.common.collect.Maps;

import java.util.Map;

/**
 * 服务分类状态枚举
 */
public enum GoodsCategoryStatusEnum {

    WAREHOUSE(0, "仓库中"),
    IN_SALES(1, "销售中");

    private final int status;
    private final String desc;

    GoodsCategoryStatusEnum(int status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    /**
     * 获取状态码
     *
     * @return Long
     * @author fzr
     */
    public int getStatus() {
        return this.status;
    }

    /**
     * 获取提示
     *
     * @return String
     * @author fzr
     */
    public String getDesc() {
        return this.desc;
    }

    public static Map<Integer, String> getMap() {
        Map<Integer, String> map = Maps.newHashMap();
        for (GoodsCategoryStatusEnum statusEnum : GoodsCategoryStatusEnum.values()) {
            map.put(statusEnum.status, statusEnum.desc);
        }
        return map;
    }
}
